package com.rboat.blog.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rboat.blog.mapper.BlogWordMapper;
import com.rboat.blog.domain.BlogWord;
import com.rboat.blog.service.IBlogWordService;
import com.rboat.common.core.text.Convert;

/**
 * 留言Service业务层处理
 * 
 * @author rboat
 * @date 2019-11-05
 */
@Service
public class BlogWordServiceImpl implements IBlogWordService 
{
    @Autowired
    private BlogWordMapper blogWordMapper;

    /**
     * 查询留言
     * 
     * @param id 留言ID
     * @return 留言
     */
    @Override
    public BlogWord selectBlogWordById(String id)
    {
        return blogWordMapper.selectBlogWordById(id);
    }

    /**
     * 查询留言列表
     * 
     * @param blogWord 留言
     * @return 留言
     */
    @Override
    public List<BlogWord> selectBlogWordList(BlogWord blogWord)
    {
        return blogWordMapper.selectBlogWordList(blogWord);
    }

    /**
     * 新增留言
     * 
     * @param blogWord 留言
     * @return 结果
     */
    @Override
    public int insertBlogWord(BlogWord blogWord)
    {
        return blogWordMapper.insertBlogWord(blogWord);
    }

    /**
     * 修改留言
     * 
     * @param blogWord 留言
     * @return 结果
     */
    @Override
    public int updateBlogWord(BlogWord blogWord)
    {
        return blogWordMapper.updateBlogWord(blogWord);
    }

    /**
     * 删除留言对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteBlogWordByIds(String ids)
    {
        return blogWordMapper.deleteBlogWordByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除留言信息
     * 
     * @param id 留言ID
     * @return 结果
     */
    @Override
    public int deleteBlogWordById(String id)
    {
        return blogWordMapper.deleteBlogWordById(id);
    }
}
